package com.orphan.audit.service.impl;

import com.orphan.audit.po.Supplier;
import com.orphan.audit.dao.SupplierMapper;
import com.orphan.audit.service.ISupplierService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yichen
 * @since 2021-07-14
 */
@Service
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService {

    @Autowired
    private SupplierMapper supplierMapper;

    @Override
    public List<Supplier> getAll() {
        List<Supplier> list = supplierMapper.getAll();
        return list;
    }

    @Override
    public boolean Update(Supplier supplier) {
        int i = supplierMapper.Update(supplier);
        return i > 0 ? true :false;

    }

    @Override
    public boolean add(Supplier supplier) {
        int i = supplierMapper.add(supplier);
        return i > 0 ? true : false;
    }
}
